val kotlinCoroutinesVersion: String by project
val koinVersion: String by project
val ktorClient: String by project
val log4jVersion: String by project

apply(plugin = "kotlin-kapt")
apply(plugin = "kotlin")

repositories {
    mavenCentral()
    google()
    maven { url = uri("https://jitpack.io") }
}

tasks.test {
    useJUnitPlatform()
}



tasks.withType<JavaCompile> {
    sourceCompatibility = "17"
    targetCompatibility = "17"
}

dependencies {
    implementation(project(mapOf("path" to ":network")))
    implementation(project(mapOf("path" to ":common")))

    // Coroutines
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion")

    // Koin
    implementation("io.insert-koin:koin-core:$koinVersion")

    // Ktor
    implementation("io.ktor:ktor-server-core:$ktorClient")
    implementation("io.ktor:ktor-server-netty:$ktorClient")

    // KTOR-CLIENT
    implementation("io.ktor:ktor-client-core:$ktorClient")
    implementation("io.ktor:ktor-client-okhttp-jvm:$ktorClient")
    implementation("io.ktor:ktor-client-content-negotiation:$ktorClient")
    implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorClient")

    // KOTLIN SERIALIZATION
    implementation("io.ktor:ktor-server-content-negotiation:$ktorClient")
    implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorClient")

}

tasks.test {
    useJUnitPlatform()
}
